<?php

class ZFKiller_View_Helper_FormDddtelefone extends Zend_View_Helper_FormText {

	public function formDddtelefone($name, $value = null, $attribs = null) {
		$attribsDDD = $attribs;
		$attribsDDD['maxlength'] = 2;
		$attribsDDD['id'] = $attribs['id'] . '_ddd';
		
		$attribs['maxlength'] = 11;
		
		if(!isset($attribs['class'])) {
			$attribs['class'] = '';
		}
		$attribsDDD['class'] = $attribs['class'] . ' dddnumber';
		$attribs['class'] = $attribs['class'] . ' telefonenumber';

		$formDdd = $this->formText($name . '[ddd]', $value['ddd'], $attribsDDD);
		$formTelefone = $this->formText($name . '[number]', $value['number'], $attribs);

		return $formDdd . $formTelefone;
	}

}